package com.sunmouse.toolkit.ftp;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2017/8/23.
 */
public class FileBean implements Parcelable {
    private int fileType;
    private String name;
    private String parent;
    private long size;

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.fileType);
        dest.writeString(this.name);
        dest.writeString(this.parent);
        dest.writeLong(this.size);
    }

    public FileBean() {
    }

    protected FileBean(Parcel in) {
        this.fileType = in.readInt();
        this.name = in.readString();
        this.parent = in.readString();
        this.size = in.readLong();
    }

    public static final Parcelable.Creator<FileBean> CREATOR = new Parcelable.Creator<FileBean>() {
        @Override
        public FileBean createFromParcel(Parcel source) {
            return new FileBean(source);
        }

        @Override
        public FileBean[] newArray(int size) {
            return new FileBean[size];
        }
    };
}
